﻿using System.Web.Services;
using BLL;

/// <summary>
///Jian_Semi_Finish_PackageCheck_Service 的摘要说明
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
//若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消对下行的注释。 
// [System.Web.Script.Services.ScriptService]
public class Jian_Semi_Finish_PackageCheck_Service : System.Web.Services.WebService
{
    private PackageProduct pp;
    private ProductType p;
    
    public Jian_Semi_Finish_PackageCheck_Service()
    {
        pp = new PackageProduct();
        p = new ProductType();
        //如果使用设计的组件，请取消注释以下行 
        //InitializeComponent(); 
    }

    [WebMethod(Description = "检验录入数据（产品类型）是否已登记的合法数据")]
    public bool IsValidProductTypeID(string productTypeID)
    {
        return p.ProductType_Exist(productTypeID);
    }

    [WebMethod(Description = "检查该序列号的产品是否有合格的常规工序追溯数据")]
    public bool HasValidPassiveStep(string productSN, string productTypeID)
    {
        productSN=CommHelper.GetProductSN(productSN);
        return pp.Package_HasValidSevenStep(productSN, productTypeID);
    }

    [WebMethod(Description = "检查该序列号的产品是否有合格的有源工序追溯数据")]
    public bool HasValidRFSourceStep(string productSN, string productTypeID)
    {
        productSN = CommHelper.GetProductSN(productSN);
        return pp.Package_HasValidRFSourceStep(productSN, productTypeID);
    }
}

